<?php echo stylesheet_tag('/FoxsisLibPlugin/css/midia_plugin.css'); ?>
<?php echo stylesheet_tag('/FoxsisLibPlugin/css/colorbox.css'); ?>

<div id="image-produto">
	<?php 
		if(count($data))
            echo image_tag(
            	"/uploads/".$data[0]['nm_midia'], 
            	array("width"=>$info['width'], 'height'=> $info['height'], 'class' => 'thumbs')
            );
		else 
			echo image_tag(
				'noimage.gif',
				array(
		    		'absolute'	=>true,
		    		'alt'		=> 'produto sem imagem',
		    		'width'		=> '250',
		    		'height'	=> '250'
		    	)
		    ); 
	?>
	<div class="image-list-data">
		<ul>
		<?php foreach($data as $midia): ?>
			<li id="show-img-buttons" style="float: left; padding-right: 5px;">
				<?php 
					echo link_to(
						image_tag("/uploads/thumb/".$midia["nm_midia"], array("rel" =>$midia["id_midia"], "width"=>50, "height"=>50, 'class' => 'thumbs')),
						image_path("/uploads/".$midia["nm_midia"]),
						array(
		                	'id'        => 'preview',
		                    'title'		=> $midia['ds_midia'],
		                    'rel'		=> 'midia_gallery'
		                )
		            );
				?>
			</li>
		<?php endforeach; ?>
		</ul>
	</div>
</div>

<script type="text/javascript">
$(function(){
	System.modaldata.openMidiaBox('midia_gallery', true);
});
</script>